package com.olda.play.system.biz.impl;

import cn.hutool.core.bean.BeanUtil;
import com.olda.play.system.biz.SysOauthClientBizService;
import com.olda.play.system.dto.SysOauthClientDto;
import com.olda.play.system.model.dao.SysOauthClientMapper;
import com.olda.play.system.model.po.SysOauthClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 */
@Service
public class SysOauthClientBizServiceImpl implements SysOauthClientBizService {


    @Autowired
    private SysOauthClientMapper sysOauthClientMapper;


    /**
     * 根据id获取OAuth2客户端认证信息
     * @param clientId
     * @return
     */
    @Override
    public SysOauthClientDto selectOAuth2ClientById(String clientId) {
        SysOauthClient sysOauthClient=sysOauthClientMapper.selectByPrimaryKey(clientId);
        SysOauthClientDto sysOauthClientDto= BeanUtil.copyProperties(sysOauthClient, SysOauthClientDto.class);
        return sysOauthClientDto;
    }
}
